<template>
	<view class="noticeClass">
		<uni-nav-bar color="#ffffff" background-color="#00aded" :status-bar="true" title="消息" fixed="true" />
		<!-- 		<u-sticky bgColor="#fff">
			<u-tabs :list="list1" @click="click"></u-tabs>
		</u-sticky> -->
		<view class="noticeClass_Main">
			<view class="title" v-for="(item, index) in mesList" :key="index">
				<view class="index">
					{{ index + 1 }}
				</view>
				<view class="content">
					{{ item.sendMessage }}
				</view>
			</view>
		</view>
		<view class="noticeClass_Floot"></view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			list1: [
				// {
				// 	name: '关注'
				// },
				// {
				// 	name: '推荐'
				// },
				// {
				// 	name: '电影'
				// },
				// {
				// 	name: '科技'
				// }
			],
			mesList: []
		};
	},
	onShow() {
		this.getMessage();
	},
	methods: {
		async getMessage() {
			let orgCode = localStorage.getItem('orgCode');
			let userId = localStorage.getItem('userId');
			const res = await this.$myRequest({
				url: '/api/v1/websocket/' + '?pageNum=1' + '&pageSize=50' + '&websocketIdList=' + userId + ',' + orgCode,
				method: 'Get'
			});
			this.mesList = res.data.data.list;
		},
		click(item) {
			// console.log(item, 'item');
		}
	}
};
</script>

<style lang="scss" scoped>
.noticeClass {
	&__Top {
	}
	&_Main {
		.title {
			display: flex;
			justify-content: flex-start;
			align-item: center;
			margin-left: 20rpx;
			font-size: 30rpx;
			font-weight: 600;
			margin-top: 20rpx;
			.content {
				margin-left: 20rpx;
			}
		}
	}

	&_Floot {
	}
}
</style>
